app.controller("homeCtrl",["$scope",'$http',function($scope,$http){
	            $scope.slider=[];
              $http({
              	method:"GET",
              	url:"http://h5.yztctech.net/api/axf/apihome.php"

              }).success(function(res){
              	 console.log(res);
              	 $scope.slider=res.data.slide;
              	 setTimeout(function(){
              	 	  swiper();
              	 },200)
              })

             function swiper(){
        	        var mySwiper = new Swiper('.swiper-container',{
                        loop: true,
                        autoplay: 3000,
                        observer:true,//修改swiper自己或子元素时，自动初始化swiper
                        observeParents:true,//修改swiper的父元素时，自动初始化swiper
                        autoplayDisableOnInteraction:true,//用户操作swiper之后是否禁止autoplay
                  });
            }
}])